﻿// this is not uesd



using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;

namespace Toom.CellularAutomata.Model
{
	public class CAState
	{
		public string name;
		public int value;
		public Color color;
	}


	public class CAStates
	{
		public CAStates( int min, int max, int background )
		{
			if ( max < min )
				throw new Exception( "CAStates.ctor: must have min<=max" );
			if ( background<min || background>max )
				throw new Exception( "CAStates.ctor: background must be >=min and <=max" );

			this.backgroundVal = background;

			this.states = new Dictionary<int, CAState>();

			int idxColorDb=0;
			for ( int idxState=min; idxState<=max; idxState++ )
			{
				CAState s = new CAState();
				s.name = "state " + idxState;
				s.value = idxState;
				s.color = colorDb[idxColorDb++];
				states.Add( idxState, s );
			}
		}

		// DATA

		int backgroundVal;
		//int minVal;
		//int maxVal;
		Dictionary<int,CAState> states;

		Color[] colorDb = 
		{
			Color.Black,
			Color.Violet,
			Color.DarkBlue,
			Color.LightBlue,
			Color.Green,
			Color.Yellow,
			Color.Orange,
			Color.Red,
			Color.White
		};

	}
}
